﻿using System;
using System.Collections.Generic;

namespace Meqs.Entity
{
    /// <summary>
    /// 学生信息
    /// </summary>
    [Serializable]
    public class StudentInfo
    {
        public StudentInfo(int mRid, string mStudentCode, string mStudentName, string mPass, short mSexy, DateTime mBirthday, DateTime mInSchoolDate, int mClsID, bool? mISEffect, string mSchoolMark)
        {
            m_RID = mRid;
            m_StudentCode = mStudentCode;
            m_StudentName = mStudentName;
            m_Pass = mPass;
            m_Sexy = mSexy;
            m_Birthday = mBirthday;
            m_InSchoolDate = mInSchoolDate;
            m_ClsID = mClsID;
            m_IsEffect = mISEffect;
            m_SchoolMark = mSchoolMark;
        }
        public StudentInfo(int mRid, string mStudentCode, string mStudentName, string mPass, short mSexy, DateTime mBirthday, DateTime mInSchoolDate, int mClsID, int mISEffect, string mSchoolMark)
        {
            m_RID = mRid;
            m_StudentCode = mStudentCode;
            m_StudentName = mStudentName;
            m_Pass = mPass;
            m_Sexy = mSexy;
            m_Birthday = mBirthday;
            m_InSchoolDate = mInSchoolDate;
            m_ClsID = mClsID;
            m_intIsEffect = mISEffect;
            m_SchoolMark = mSchoolMark;
        }
        public StudentInfo()
        {
            m_RID = 0;
            m_StudentCode = null;
            m_StudentName = null;
            m_Pass = null;
            m_SchoolMark = null;

        }

        #region RID

        private int m_RID;

        public int RID
        {
            get { return m_RID; }
            set { m_RID = value; }
        }

        #endregion

        #region StudentCode

        private string m_StudentCode;

        public string StudentCode
        {
            get { return m_StudentCode; }
            set { m_StudentCode = value; }
        }

        #endregion

        #region StudentName

        private string m_StudentName;

        public string StudentName
        {
            get { return m_StudentName; }
            set { m_StudentName = value; }
        }

        #endregion

        #region Passwd

        private string m_Pass;

        public string Passwd
        {
            get { return m_Pass; }
            set { m_Pass = value; }
        }

        #endregion

        #region Sexy

        private short m_Sexy;

        public short Sexy
        {
            get { return m_Sexy; }
            set { m_Sexy = value; }
        }
        #endregion

        #region Birthday

        private DateTime m_Birthday;

        public DateTime Birthday
        {
            get { return m_Birthday; }
            set { m_Birthday = value; }
        }
        #endregion

        #region InSchoolDate

        private DateTime m_InSchoolDate;

        public DateTime InSchoolDate
        {
            get { return m_InSchoolDate; }
            set { m_InSchoolDate = value; }
        }
        #endregion

        #region ClsID

        private int m_ClsID;

        public int ClsID
        {
            get { return m_ClsID; }
            set { m_ClsID = value; }
        }

        #endregion

        #region IsEffect

        private bool? m_IsEffect;

        public bool? IsEffect
        {
            get { return m_IsEffect; }
            set { m_IsEffect = value; }
        }

        #endregion

        #region SchoolMark

        private string m_SchoolMark;

        public string SchoolMark
        {
            get { return m_SchoolMark; }
            set { m_SchoolMark = value; }
        }

        #endregion


        #region ClsIndex

        private int m_ClsIndex;

        public int ClsIndex
        {
            get { return m_ClsIndex; }
            set { m_ClsIndex = value; }
        }

        #endregion


        #region intIsEffect

        private int m_intIsEffect;

        public int intIsEffect
        {
            get { return m_intIsEffect; }
            set { m_intIsEffect = value; }
        }

        #endregion
        #region Rewrite Equals and HashCode

        /// <summary>
        /// 
        /// </summary>
        public override bool Equals(object obj)
        {
            if (this == obj) return true;
            if ((obj == null) || (obj.GetType() != GetType())) return false;
            StudentInfo castObj = (StudentInfo)obj;
            return (castObj != null)
 && m_RID == castObj.RID;
        }

        /// <summary>
        /// 用唯一值实现GetHashCode
        /// </summary>
        public override int GetHashCode()
        {
            int hash = 83;
            hash = hash * 83
 * m_RID.GetHashCode(); return hash;
        }

        #endregion


    }

    [Serializable]
    public class VStudentInfo : StudentInfo
    {
        public VStudentInfo()
        {
        }

        public VStudentInfo(int mRid, string mStudentCode, string mStudentName, string mPass, short mSexy, DateTime mBirthday, DateTime mInSchoolDate, int mClsID, bool? mISEffect, string mSchoolMark,
                           string sexyStr, string birthdayStr, string inSchoolDateStr)
            : base(mRid, mStudentCode, mStudentName, mPass, mSexy, mBirthday, mInSchoolDate, mClsID, mISEffect, mSchoolMark)
        {
            m_SexyStr = sexyStr;
            m_BirthdayStr = birthdayStr;
            m_InSchoolDateStr = inSchoolDateStr;
        }

        public VStudentInfo(int mRid, string mStudentCode, string mStudentName, string mPass, short mSexy, DateTime mBirthday, DateTime mInSchoolDate, int mClsID, int mISEffect, string mSchoolMark,
                           string sexyStr, string birthdayStr, string inSchoolDateStr)
            : base(mRid, mStudentCode, mStudentName, mPass, mSexy, mBirthday, mInSchoolDate, mClsID, mISEffect, mSchoolMark)
        {
            m_SexyStr = sexyStr;
            m_BirthdayStr = birthdayStr;
            m_InSchoolDateStr = inSchoolDateStr;
        }
        
        #region SexyStr

        private string m_SexyStr;

        public string SexyStr
        {
            get { return m_SexyStr; }
            set { m_SexyStr = value; }
        }
        #endregion

        #region BirthdayStr

        private string m_BirthdayStr;

        public string BirthdayStr
        {
            get { return m_BirthdayStr; }
            set { m_BirthdayStr = value; }
        }
        #endregion

        #region InSchoolDateStr

        private string m_InSchoolDateStr;

        public string InSchoolDateStr
        {
            get { return m_InSchoolDateStr; }
            set { m_InSchoolDateStr = value; }
        }
        #endregion

    }
}